/* 
* @Author: liyun
* @Date:   2018-07-14 13:17:15
* @Last Modified by:   Marte
* @Last Modified time: 2018-07-14 20:35:46
*/

$(document).ready(function(){
    //导航点击
    var $selectInput = $('.select-input')
    $selectInput.on('click',function(event){
         event.stopPropagation();
        var $this = $(this);
        $this.addClass('focus-style');
        $this.parents('.nav-select').find('ul').removeClass('hide');
        $this.parents('.nav-select').find('.line').removeClass('hide');
    });
    $('.nav-select ul').on('click',function(event){
        event.stopPropagation(); 
    })
    //阻止冒泡
    $(document).click(function(){
        $selectInput.removeClass('focus-style');
        $selectInput.parents('.nav-select').find('ul').addClass('hide');
        $selectInput.parents('.nav-select').find('.line').addClass('hide');
    });
    //分页事件
    $('.page li').on('click',function(){
        var $this = $(this);
        $this.addClass('active').siblings('li').removeClass('active')
    })
});